package KMLGenerator;

/**
 * This class represent the abstract concept of style, and generalize 
 * the MapVert style (MVStyle) and the MapEdge style (MEStyle)
 * @author Andrea Piermarteri, Matteo Micheletti, Diego Cervellini
 *
 */
public abstract class Style {
String id;
String color;

/**
 * Constructor of style; it is called only by its subclasses.
 * @param id
 * @param color
 */
public Style(String id, String color) {
	this.id = id;
	this.color = color;
}

/**
 * 
 * @return the id of the style.
 */
public String getId() {
	return id;
}

/**
 * Sets the id of the Style.
 * @param id
 */
public void setId(String id) {
	this.id = id;
}

/**
 * 
 * @return color.
 */
public String getColor() {
	return color;
}

/**
 * Sets the color of this style.
 * @param color
 */
public void setColor(String color) {
	this.color = color;
}

/**
 * @override
 * Checks the equality between Styles.
 */
public boolean equals(Object p){
	if((p instanceof Style) && this.getId().trim().equalsIgnoreCase(((Style)p).getId().trim())) return true;
	else return false;
}

}
